#ifndef __THREAD_POOL_H__
#define __THREAD_POOL_H__

#include <thread>
#include <vector>

#include "server/TaskQueue.h"
#include "server/Thread.h"

using std::thread;
using std::vector;

class Threadpool{
public:

private:
    Threadpool(int threadNum, int bufSize);
    void startThreadPool();
    void stopThreadPool();
    void addTask(Task);
    void threadFunc();
    Task getTask();

public:

private:
    vector<Thread> _vecThread;
    int _bufSize;
    int _threadNum;
    TaskQueue _taskQue;

};

#endif